package action;

import com.opensymphony.xwork2.ActionContext;

import bean.User;
import daoImpl.UserDaoImpl;

public class UserAction {
	private User user;

	public String login() {
		ActionContext context = ActionContext.getContext();	
		if(new UserDaoImpl().finduser(user)) {
//			context.put("name", user.);
//			context.put("password", password);
			return "ok";
		}else {
			return "no";
		}
	}
	public String register(){
		ActionContext context=ActionContext.getContext();
		if(new UserDaoImpl().reguser(user)){
			return "ok";
		}else{
		return "no";
		}
	}

	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}


	
}
